home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Error / DLL / MakeDLL < prev    next >
Text File  |  1995-07-08  |  3KB  |  134 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.Error    \
  4.             o.global    \
  5.  
  6.  
  7. LibName        =    Error
  8.  
  9.  
  10.  
  11. # Template makefile to make Straylight Dynamic Link 
  12. # Library from a DeskLib sublibrary's .o files
  13. #
  14. # The DLL is made in the directory 
  15. # '<DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.'
  16. # and has the same name as the DeskLib sublibrary.
  17. #
  18. # Julian Smith 17 Apr 1995.
  19.  
  20. # The macro $(ObjectFiles) should be set at the 
  21. # start of this file, to be a space-separated
  22. # list of object files.
  23. # This is done by 'Makatic'.
  24.  
  25. # The macro $(LibName) should also be set at the 
  26. # start of this file, to be the name of the 
  27. # DeskLib sublibrary.
  28. # This is done by 'Makatic'.
  29.  
  30. # Note that this makefile doesn't use cc at all
  31. # - it merely links existing .o files.
  32.  
  33. # Linker flags, These can be anything. 
  34. # All flags required by Straylight (eg Link -rmf) 
  35. # are included in the $(LINK) macro.
  36. #
  37. LinkFlags    =    $(LinkExtra)
  38.  
  39.  
  40. # Macros for commands, including the Straylight
  41. # tool 'cdll'. Note that DRLink doesn't seem to
  42. # work with the SDLS.
  43. #
  44. LINK        =    Link -rmf
  45. CDLL        =    cdll
  46.  
  47.  
  48. # Filename of the thing we need to make: - the main
  49. # dynamically-linked library, which will go in the 
  50. # !DLL application.
  51. # NB The leafname of $(DLL_Lib) file (after copying into the !DLL
  52. # application) should be the same as the 'name' field in the
  53. # $(DLL_Def) file. In this case, this is $(LibName).
  54. DLL_Lib        =    <DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.$(LibName)
  55.  
  56.  
  57. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  58. #
  59. DLL_Header    =    Header
  60. DLL_Def        =    ^.DLLDef
  61. DLL_Stubs    =    Stubs
  62.  
  63.  
  64.  
  65. # -------------------------------------------------------
  66. # Everything below here should probably not be changed...
  67. # -------------------------------------------------------
  68.  
  69.  
  70. # Extra libs, written by Straylight, which always need to be linked into a DLL
  71. #
  72. SDLS_ExtraObjects=                    \
  73.             C:DLLLib.o.DLLLib        \
  74.             C:DLLLib.o.dstubs        \
  75.  
  76.  
  77. # Extra DeskLib libraries which need to be linked into the final DLL.
  78. # The DLL DeskLib library is included here because some DeskLib DLLs may
  79. # refer to other DeskLib DLLs.
  80. # Note that DeskLib:o.DLL contains all the DLL.o.* files except for 
  81. # the sublibraries for which there is a DLL - just the DLL Stubs file
  82. # is included for these.
  83. #
  84. DeskLib_ExtraObjects=                \
  85.             DeskLib:o.DLLDLL    \
  86.  
  87.  
  88.  
  89.  
  90. #Here's what we want to make...
  91.  
  92. All:    $(DLL_Lib)
  93.  
  94. $(DLL_Lib):    $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header) $(ObjectFiles)
  95.     $(LINK) $(LinkFlags) -o $@ $(ObjectFiles) $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header)
  96.  
  97.  
  98.  
  99. # Here's how to make the things which are needed in the above rules
  100.  
  101. $(DLL_Def):    
  102.     | Error: No DLL definition file exists.
  103.     |        You should run th MkStubsOs makefile
  104.     |        and then alter the template Def
  105.     |        file by hand.
  106.  
  107. $(DLL_Header):    $(DLL_Def)
  108.     $(CDLL) -def $(DLL_Def) -hdr $(DLL_Header)
  109.  
  110.  
  111. # Rule for compiling C source code for a Straylight dynamically-linked library.
  112. # Actually, we don't call cc - we complain and tell the user to run the 
  113. # MkStubsOs makefile.
  114.  
  115. VPATH = @.^
  116.  
  117. .SUFFIXES:    .o .c .s
  118. .c.o:
  119.     | $@ needs recompiling. This should be done by
  120.     | running the MkStubsOs or MkOs makefile before running
  121.     | this makefile.
  122.     |
  123.  
  124. .s.o:
  125.     | $@ needs assembling. This should be done by
  126.     | running the MkStubsOs or MkOs makefile before running
  127.     | this makefile.
  128.     |
  129.  
  130.  
  131.  
  132. # Dynamic dependencies:
  133.